# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test01
# Description:
# Author:       98745
# Date:         2019/4/6
#-------------------------------------------------------------------------------

from bs4 import BeautifulSoup
html='''
<html>
    <head><title>html5lib测试</title></head>
    <body>
       <tr>
		<td><a href="/weather/hunan/DaoXian.htm">道县</a></td>
		<td><a href="/weather/hunan/daxiang.htm">大祥</a></td>
		<td><a href="/weather/hunan/dingcheng.htm">鼎城</a></td>
		<td><a href="/weather/hunan/DongAn.htm">东安</a></td>
		<td><a href="/weather/hunan/DongKou.htm">洞口</a></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
    </body>
</html>
'''

soup=BeautifulSoup(html,'lxml')
soup_body=soup.find('body')
soup_tr=soup_body.find('tr')
soup_td=soup_tr.find_all('td')
for item in soup_td:
    # if item.a is not None:
    print(item.a)
    print('-------')